package com.example.back.impl;

import com.example.back.mapper.SwitchGameMapper;
import com.example.back.model.PsGame;
import com.example.back.model.SwitchGame;
import com.example.back.service.SwitchGameService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SwitchGameServiceImpl implements SwitchGameService {
    @Resource
    private SwitchGameMapper switchGameMapper;

    @Override
    public List<SwitchGame> findAllSwitchGame() {
        return switchGameMapper.findAllSwitchGame();
    }

    @Override
    public List<SwitchGame> findByInformation(String information) {
        return switchGameMapper.findByInformation(information);
    }

    @Override
    public List<SwitchGame> findAllSwitchGameByScore() {
        return switchGameMapper.findAllSwitchGameByScore();
    }

    @Override
    public List<SwitchGame> searchSType(String type){return switchGameMapper.searchSType(type);}

    @Override
    public List<SwitchGame> selectSName(String name) {return switchGameMapper.selectSName(name);}

    @Override
    public Boolean insertSwitchGame(String name, String introduction, String yuyan, String type, double score) {
        return switchGameMapper.insertSwitchGame(name, introduction, yuyan, type, score);
    }

    @Override
    public Boolean updateYuyanByID(int id, String yuyan) {
        return switchGameMapper.updateYuyanByID(id, yuyan);
    }

    @Override
    public Boolean updateScoreByID(int id, double score){
        return switchGameMapper.updateScoreByID(id, score);
    }

    @Override
    public Boolean deleteSwitchGame(int id) {
        return switchGameMapper.deleteSwitchGame(id);
    }

    @Override
    public String findPhotoByID(int id){ return  switchGameMapper.findPhotoByID(id);}
}
